/*
 * @Description: 描述信息
 * @Version: 版本号
 * @Author: xuebao
 * @Date: 2023-12-08 22:20:30
 * @LastEditors: xuebao
 * @LastEditTime: 2023-12-15 12:07:24
 */
import { RouterProvider } from 'react-router-dom'
import { ConfigProvider, App as AntdApp, theme } from 'antd'
import AntdGlobal from './utils/AntdGlobal'
import router from './router/index'
import './App.less'
import './styles/theme.less'
import { useStore } from './store/index'
function App() {
  const isDark = useStore((state) => state.isDark)
  // return
  return (
    <ConfigProvider
      theme={{
        token: {
          // Seed Token，影响范围大
          colorPrimary: '#ed6c00',
        },
        algorithm: isDark ? theme.darkAlgorithm : theme.defaultAlgorithm,
      }}
    >
      <AntdApp>
        <AntdGlobal />
        <RouterProvider router={router} />
      </AntdApp>
    </ConfigProvider>
  )
}
export default App
